 using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SoundManagerBase : MonoBehaviour
{

    public AudioSource soundOne;
    public AudioSource soundTwo;

    public AudioClip[] hitSounds;
    public AudioClip[] attackSounds;

    public void PlayHit()
    {
        int index = Random.Range(0, hitSounds.Length);
        PlaySound(hitSounds[index]);
    }

    public void PlayAttack(int index)
    {
        PlaySoundOther(attackSounds[index]);
    }

    protected void PlaySound(AudioClip clip)
    {
        soundOne.clip = clip;
        soundOne.Play();
    }

    protected void PlaySoundOther(AudioClip clip)
    {
        soundTwo.clip = clip;
        soundTwo.Play();
    }


}
